#ifndef __CONTROL_H
#define __CONTROL_H	 
#include "sys.h"
#include "stm32f10x_tim.h"
	 	
typedef struct
{
	int vertical;
	int speed;
	int turn;
	int left;
	int right;
}DATA;

typedef volatile struct
{
	float kp;           
	float ki;          
	float kd;       
}PID;


void Pid_init(void);
void EXTI1_Master(void);
int Vertical_UP(float Angle,float Mechanical_median,float Gyro);
int Speed(int Expect,int encoder_left,int encoder_right);
int Turns(int gyro_Z,int RC);
#endif


